package com.modules.main2;


import android.databinding.DataBindingUtil;
import android.view.View;

import com.base.mvvm2.MVVMBaseActivity2;
import com.gml.gao.R;
import com.gml.gao.databinding.MainActivity2Binding;


/**
 * MVPPlugin
 * 邮箱 784787081@qq.com
 */

public class MainActivity2 extends MVVMBaseActivity2<UserViewModle> {


    private MainActivity2Binding binding;

    @Override
    public void initView() {
//        this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
        binding = DataBindingUtil.setContentView(this, R.layout.main_activity2);
        binding.setHandler(this);
        if (mPresenter != null) {
            binding.setViewModel(mPresenter);
        }
    }

    @Override
    protected void handleToolBar(ToolBarHelper toolBarHelper) {
        toolBarHelper.setTitle("界面");
//        toolBarHelper.setHomeAsUpEnabled(true);
//        toolBarHelper.setLogo();
    }

    @Override
    protected void initInjector() {
        DaggerMain2Componet.builder()
                .appComponent(getAppComponent())
                .build()
                .inject(this);
    }

    public void click(View view) {
        mPresenter.login("15901222696", "qqqqqqqq");
    }

}
